bison.name = Bison ${QMAKE_FILE_IN}
bison.input = BISONSOURCES
bison.output = ${QMAKE_FILE_BASE}.cpp
bison.commands = bisonc++ --class-header=${QMAKE_FILE_BASE}.h \
  --implementation-header=${QMAKE_FILE_BASE}.ih \
  --parsefun-source=${QMAKE_FILE_BASE}.cpp \
  --verbose --scanner=Scanner.h # variable must be here
  # --baseclass-header=SOME_HEADER
  # --baseclass-preinclude=SOME_HEADER # also you can use diz shit
bison.CONFIG += target_predeps
# bison.variable_out = GENERATED_SOURCES # don't really matter but can help
silent:bison.commands = @echo Bison ${QMAKE_FILE_IN} && $$bison.commands
QMAKE_EXTRA_COMPILERS += bison

bison_header.input = BISONSOURCES
bison_header.output = ${QMAKE_FILE_BASE}.h
bison_header.commands = bisonc++ --class-header=${QMAKE_FILE_BASE}.h \
  --implementation-header=${QMAKE_FILE_BASE}.ih \
  --parsefun-source=${QMAKE_FILE_BASE}.cpp \
  --verbose --scanner=Scanner.h # variable must be here
  # --baseclass-header=SOME_HEADER
  # --baseclass-preinclude=SOME_HEADER # also you can use diz shit
bison_header.CONFIG += target_predeps no_link
silent:bison_header.commands = @echo Bison ${QMAKE_FILE_IN} && $$bison.commands
QMAKE_EXTRA_COMPILERS += bison_header